import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
//创建store容器
import {createStore} from 'redux'
//引入provider实现数据共享
import {Provider} from 'react-redux'
//引入数据方法组件
import reducer from './reducers/shop'
//创建redux store来存放应用的状态
//api是subscribe dispatch getstate
let store = createStore(reducer)
// import registerServiceWorker from './registerServiceWorker';

ReactDOM.render(
    //用provider把根组件包起.来并且传入store实现数据共享
    <Provider store={store}>
        <App />
    </Provider>

, document.getElementById('root'));
// registerServiceWorker();
